import { IsNotEmpty, IsString, Length } from 'class-validator'
import { ApiProperty } from "@nestjs/swagger"

export class CreateUserAccountDto {
    @IsNotEmpty({ message: "不能为空" })
    @IsString({ message: "类型为字符串" })
    @Length(6, 12, { message: "长度在6-12" })
    @ApiProperty({ description: "账号", example: "123456" })
    readonly account: string

    @IsNotEmpty({ message: "不能为空" })
    @IsString({ message: "类型为字符串" })
    @Length(6, 12, { message: "长度在6-12" })
    @ApiProperty({ description: "密码", example: "123456aa" })
    readonly password: string
}
